home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.JList;
- import com.sun.java.swing.event.ListSelectionEvent;
- import com.sun.java.swing.event.ListSelectionListener;
- import java.io.File;
- import java.util.EventObject;
-
- class BasicFileChooserUI$SelectionListener implements ListSelectionListener {
- // $FF: synthetic field
- BasicFileChooserUI this$0;
-
- public void valueChanged(ListSelectionEvent e) {
- if (!e.getValueIsAdjusting()) {
- JList list = (JList)((EventObject)e).getSource();
- File f = (File)list.getSelectedValue();
- if (f != null && (this.this$0.getFileChooser().isDirectorySelectionEnabled() || !this.this$0.getFileChooser().isTraversable(f))) {
- this.this$0.getFileChooser().setSelectedFile(f);
- }
- }
-
- }
-
- // $FF: synthetic method
- BasicFileChooserUI$SelectionListener(BasicFileChooserUI this$0) {
- this.this$0 = this$0;
- }
- }
-